<?
	include('header.php');
	if($_GET['id']) {
		$drizzo_post_id = $_GET['id'];
		if($drizzo_post_id == 'blog') {
?>
		<div id="content">
<?			
		$the_posts = drizzo_get_the_posts(10, 0, "publish", "blog"); // Start the Loop
		foreach($the_posts as $the_post) {
?>
			<div class="post">
				<h2><a href="<? echo drizzo_post_permalink(); ?>"><? echo drizzo_post_title(); ?></a><img src="http://<? echo domain_name . admin_folder . "engine/user_avatar.php?user_id=" . $the_post['author']; ?>" alt="<? echo drizzo_post_author("nice_name"); ?>" class="post_avatar" /></h2>

				<p class="post_meta">By <? echo drizzo_post_author("nice_name"); ?> on <? echo drizzo_post_date(); ?></p>
				<p class="content"><? echo drizzo_post_excerpt(); ?></p>
				<p class="post_meta"><span class="tags_meta"><strong>Tags:</strong> <? echo drizzo_post_tags(); ?></span> | <span class="comments_meta"><strong><a href="<? echo drizzo_post_permalink(); ?>#comments" title="View Comments">Comments:</strong> <? echo drizzo_comment_count(); ?></a></span><? echo drizzo_edit_link(" | ", ""); ?></p>
			</div>
		<?
				}
		?>

			</div>

		</div>
<?
		} else {
?>
		<div id="content">
			
<?
		$the_post = (drizzo_get_the_post($drizzo_post_id)); // Start the Loop
?>
			<div class="post">
				<h2><a href="<? echo drizzo_post_permalink(); ?>"><? echo drizzo_post_title(); ?></a><img src="http://<? echo domain_name . admin_folder . "engine/user_avatar.php?user_id=" . $the_post['author']; ?>" alt="<? echo drizzo_post_author("nice_name"); ?>" class="post_avatar" /></h2>

				<p class="post_meta">By <? echo drizzo_post_author("nice_name"); ?> on <? echo drizzo_post_date(); ?></p>
				<p class="content"><? echo drizzo_post_content(); ?></p>
				<p class="post_meta"><span class="tags_meta"><strong>Tags:</strong> <? echo drizzo_post_tags(); ?></span><? echo drizzo_edit_link(" | ", ""); ?></p>

				<hr />
				
				<div id="comments">
<?
	include('comments.php');
?>
				</div>
			</div>

		</div>
<?
		}
	}
	include('sidebar.php');
	include('footer.php');
?>